import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'

// 引入ElementPlus响应式布局
import 'element-plus/theme-chalk/display.css'
// 引入ElementPlusIconsVue
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入全局样式
import '@/assets/css/index.scss'

// 引入自定义SvgIcon
import 'virtual:svg-icons-register'

// 引入鉴权
import '@/router/permission'

// 引入状态管理
import { store } from '@/store'

// 创建实例
const app = createApp(App)

// 注册ElementPlusIcons
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(store)
app.use(router)
app.mount('#app')
